/* 背景：两直角 两圆角
* 文字：居中*/

import 'package:flutter/cupertino.dart';

class TimeMarkView extends StatelessWidget {
  late Color? backgroundColor;
  late String text;
  late double? textSize;
  late Color? textColor;
  late double radius;

  TimeMarkView(
      {Key? key,
      this.backgroundColor = const Color(0xFF5F7292),
      required this.text,
      this.textSize = 12,
      this.radius = 10,
      this.textColor = const Color(0xFFffffff)});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(horizontal: 10,vertical: 7),
        decoration: BoxDecoration(
            borderRadius: BorderRadius.only(
                topLeft: Radius.zero,
                topRight: Radius.circular(radius),
                bottomRight: Radius.zero,
                bottomLeft: Radius.circular(radius)),
            color: backgroundColor),
        child:
            Text(text, style: TextStyle(fontSize: textSize, color: textColor)));
  }
}
